define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {

    var Controller = {
        index: function () {
            
            $(".datetimerange").data("callback", function (start, end) {
                console.log(666);
                var date = start.format(this.locale.format) + " - " + end.format(this.locale.format);
                console.log(date);
                $(this.element).val(date);
            });
        },
        add: function () {
            Controller.api.bindevent();
        },
        edit: function () {
            Controller.api.bindevent();
        },
        api: {
            bindevent: function () {
                Form.api.bindevent($("form[role=form]"));
            },
            formatter: {
                css:function(){
                    return{
                        css:{
                            "max-width":"450px !important",
                            "overflow":"hidden",
                            "white-space":"nowrap",
                            "text-overflow":"ellipsis",
                            "display":"block",
                        }
                    };
                }
            }
        }
    };
    return Controller;
});
